package com.partner.service.order;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.partner.bean.order.Order;
import com.partner.mapper.order.OrderMapper;

@Service("order")
public class OrderService {

	@Autowired
	private OrderMapper orderMapper;
	
	public OrderMapper getServiceMapper(){
		return orderMapper;
	}
	
	public int insert(Order s) {
		int id =0 ;	
		try {
		   id =	orderMapper.insert(s);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return id ;
	}
	
	public List<Order> selectAll(Order order) {
		return orderMapper.selectAll(order);
	}
	
	public List<Order> selectAll1() {
		return orderMapper.selectAll1();
	}
	
	public Order selectByPrimaryId(Integer id){
		return orderMapper.selectByPrimaryId(id);
	}
	
	public int removeByPrimaryKey(Integer id){
		return orderMapper.deleteByPrimaryKey(id);
	}
	
	public int deleteByids(String[] ids){
		return orderMapper.deleteByids(ids);
	}
	
	public int updateByPrimaryKey(Order order){
		return orderMapper.updateByPrimaryKey(order);
	}

	public Integer report1(Order order) {
		return orderMapper.report1(order);
	}

	public List<Order> report3(Order order) {
		return orderMapper.report3(order);
	}
}
